function[confM_seq]= confmat_svm(mpe,long_seq,state)


[m n] = size(long_seq);
for i = 1:m
    actual_int(i,1) = long_seq(i,1);
    infered_int(i,1) =mpe(i,1);
end

confM_seq = zeros(state);
% for intermediate states (midlevel)
for i = 1:m
    truth = actual_int(i,1);
    inferredClass = infered_int(i,1);
    confM_seq(truth, inferredClass) = confM_seq(truth,inferredClass) + 1;
%     if (truth ~= inferredClass)
%         fprintf('sample number %d\n', i); 
%     end
end